<template>
  <div id="app">
    <song-audio></song-audio>
    <!-- <keep-alive> -->
    <router-view v-if="isRouterAlive"/>
    <!-- </keep-alive> -->
    <tabbar></tabbar>
  </div>
</template>

<script>
import SongAudio from './components/SongAudio/songAudio.vue'
import tabbar from './components/tabbar/tabbar.vue'

export default {
  name: 'App',
  components: { 
    tabbar,
    SongAudio 
  },
  
  provide(){
    return{
      reload: this.reload
    }
  },

  data() {
    return {
      isRouterAlive: true
    }
  },

  methods:{
    reload () {
      this.isRouterAlive = false
      this.$nextTick(function() {
         this.isRouterAlive = true
      })
    }
  }
}
</script>

<style>
html,body{
  height: 100%;
  width: 100%;
}
</style>
